﻿using Order;
using System;
using System.Windows.Forms;

namespace OrderForm
{
    public partial class Detail : Form
    {
        readonly OrderDetail detail;
        public Detail(OrderDetail detail)
        {
            InitializeComponent();
            this.detail = detail;
        }

        private void Submit_Click(object sender, EventArgs e)
        {
            detail.Commodity.Name = name.Text;
            detail.Commodity.Price = (double)price.Value;
            detail.Amount = (int)amount.Value;
            Close();
        }
    }
}
